//
//  SelectionCell.m
//  ComboBox
//
//  Created by Eric Che on 7/17/13.
//  Copyright (c) 2013 Eric Che. All rights reserved.
//

#import "SelectionCell.h"

@implementation SelectionCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        
        _lb = [[UILabel alloc]init];
        _lb.font=[UIFont systemFontOfSize:14*BIZ];
        _lb.frame = self.frame;
        
        [self addSubview:_lb];
    }
    
    return self;
    
}

-(void)setDic:(NSDictionary *)dic{
    NSString *role=dic[@"userType"];
    if([role isEqualToString:@"1"]){//巡检组长
        _lb.text=@"  巡检组长";
    }else if ([role isEqualToString:@"2"]){//巡检员
        _lb.text=@"  巡检员";

    }else if([role isEqualToString:@"USER_01"]){//总监
        _lb.text=@"  总监";

    
    }else if([role isEqualToString:@"USER_03"]){//监理
        _lb.text=@"  监理";

    }else if([role isEqualToString:@"USER_07"]){//专监
        _lb.text=@"  专监";
        
    }else if([role isEqualToString:@"CONSTRACT_01"]){
       _lb.text=@"  施工方经理";
    }else if([role isEqualToString:@"CONSTRACT_02"]){
        _lb.text=@"  施工方总工";

    }else if([role isEqualToString:@"CONSTRACT_03"]){
        _lb.text=@"  施工方安全总监";

    } else if([role isEqualToString:@"CONSTRACT_04"]){
        _lb.text=@"  施工方质检员";

    }else if([role isEqualToString:@"CONSTRACT_05"]){
        _lb.text=@"  施工方安全员";

    }else if([role isEqualToString:@"CONSTRACT_06"]){
        _lb.text=@"  施工方实验员";

    }else if([role isEqualToString:@"CONSTRACT_07"]){
        _lb.text=@"  施工方工长";

    }else if([role isEqualToString:@"LEADER_01"]){//领导
        
        _lb.text=@"  领导";

    }else if ([role isEqualToString:@"USER_05"]){
        _lb.text=@"  日志工程师";
    }
    else if ([role isEqualToString:@"USER_04"]){
        _lb.text=@"  监理安全工程师";
    } else if ([role isEqualToString:@"BUILD_01"]){
        _lb.text=@"  单位领导";
    }else if ([role isEqualToString:@"BUILD_02"]){
        _lb.text=@"  建设单位工程部";
    }else if([role isEqualToString:@"USER_02"]){
        _lb.text=@"  副总监";

    } else if ([role isEqualToString:@"CONSTRACT_08"]) {
        _lb.text = @"  检查单位实验员";
    }
}

@end
